package com.qiangqiang.task.server.mapper;

import com.qiangqiang.task.server.entity.Moments;
import com.qiangqiang.task.server.entity.Post;
import com.qiangqiang.task.server.mapper.provider.MomentsProvider;
import com.qiangqiang.task.server.mapper.provider.PostMapperProvider;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.List;
import java.util.Set;

/**
 * @program: task
 * @description:
 * @author: Sky.lin
 * @create: 2019-01-05 20:53
 **/
@Mapper
public interface MomentsMapper {

    @InsertProvider(type = MomentsProvider.class, method = "insertMoments")
    int insertMoments(@Param("moments") Moments moments);

    @SelectProvider(type = MomentsProvider.class,method = "queryAllMomentsByFollowId")
    List<Moments> queryAllMomentsByFollowId(@Param("page") int page,@Param("pageSize") int pageSize,
                                            @Param("idList") Set<Long> idList);
}
